package com.yfjin.gl.filter;

import android.content.Context;
import android.opengl.GLES20;

import com.yfjin.gl.R;

public class CameraFilter extends AbstractFboFilter {

    private final int vMatrix;

    private float[] mMtx;

    public CameraFilter(Context context) {
        super(context, R.raw.camera_vert, R.raw.camera_frag);
        vMatrix = GLES20.glGetUniformLocation(program, "vMatrix");
    }

    public void setTransformMatrix(float[] mtx) {
        mMtx = mtx;
    }

    @Override
    protected void beforeDraw() {
        GLES20.glUniformMatrix4fv(vMatrix, 1, false, mMtx, 0);
    }



}
